]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Replace GnomeIdleMonitor with MetaIdleMonitor
authorGiovanni Campagna <gcampagn@redhat.com>
Wed, 14 Aug 2013 13:47:27 +0000 (15:47 +0200)
committerGiovanni Campagna <gcampagn@redhat.com>
Fri, 23 Aug 2013 14:22:44 +0000 (16:22 +0200)
Now that GnomeIdleMonitor is a DBus API for mutter, we need to
use own in-process thing, to avoid dead locks.

https://bugzilla.gnome.org/show_bug.cgi?id=706005

js/ui/messageTray.js
js/ui/pointerWatcher.js
js/ui/screenShield.js
js/ui/unlockDialog.js

index 0ba3e6238d5ee204a1b22dfad5d0d00ae574164b..c87a2983ca9eb65889eeff1a69e1957a533def5b 100644 (file)
@@ -1685,7 +1685,7 @@ const MessageTray = new Lang.Class({
 
         this._userActiveWhileNotificationShown = false;
 
-        this.idleMonitor = new GnomeDesktop.IdleMonitor();
+        this.idleMonitor = Meta.IdleMonitor.get_core();
 
         this._grabHelper = new GrabHelper.GrabHelper(this.actor,
                                                      { keybindingMode: Shell.KeyBindingMode.MESSAGE_TRAY });
index 38339b8f926315b1d7435101e64e67b89e4fd134..87b4b7431c0feb465a78119d98f7c8131a8cb812 100644 (file)
@@ -2,6 +2,7 @@
 
 const Lang = imports.lang;
 const Mainloop = imports.mainloop;
+const Meta = imports.gi.Meta;
 const GnomeDesktop = imports.gi.GnomeDesktop;
 const Shell = imports.gi.Shell;
 
@@ -41,7 +42,7 @@ const PointerWatcher = new Lang.Class({
     Name: 'PointerWatcher',
 
     _init: function() {
-        this._idleMonitor = new GnomeDesktop.IdleMonitor();
+        this._idleMonitor = Meta.IdleMonitor.get_core();
         this._idleMonitor.add_idle_watch(IDLE_TIME, Lang.bind(this, this._onIdleMonitorBecameIdle));
         this._idle = this._idleMonitor.get_idletime() > IDLE_TIME;
         this._watches = [];
index f9ab4e9cbf7dcc4ccd6f38993a3fca7a6db0a49b..304ef349f728928a7aadf916c89f71184ae28219 100644 (file)
@@ -592,7 +592,7 @@ const ScreenShield = new Lang.Class({
                                                       fadeFactor: 1 });
         this._shortLightbox.connect('shown', Lang.bind(this, this._onShortLightboxShown));
 
-        this.idleMonitor = new GnomeDesktop.IdleMonitor();
+        this.idleMonitor = Meta.IdleMonitor.get_core();
     },
 
     _createBackground: function(monitorIndex) {
index 13a2bd416308d68f6989b0002aa20cfa7842641f..b0d342b9eeab080575d17c8038ab8ba9704f50a1 100644 (file)
@@ -9,6 +9,7 @@ const GLib = imports.gi.GLib;
 const GnomeDesktop = imports.gi.GnomeDesktop;
 const Gtk = imports.gi.Gtk;
 const Lang = imports.lang;
+const Meta = imports.gi.Meta;
 const Signals = imports.signals;
 const Shell = imports.gi.Shell;
 const St = imports.gi.St;
@@ -80,7 +81,7 @@ const UnlockDialog = new Lang.Class({
 
         Main.ctrlAltTabManager.addGroup(this.actor, _("Unlock Window"), 'dialog-password-symbolic');
 
-        this._idleMonitor = new GnomeDesktop.IdleMonitor();
+        this._idleMonitor = Meta.IdleMonitor.get_core();
         this._idleWatchId = this._idleMonitor.add_idle_watch(IDLE_TIMEOUT * 1000, Lang.bind(this, this._escape));
     },